Optimal. Leaf size=98 \[ \frac{2^{n-\frac{1}{2}} n \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac{1}{2}} (a \sec (c+d x)+a)^n \text{Hypergeometric2F1}\left (\frac{1}{2},\frac{3}{2}-n,\frac{3}{2},\frac{1}{2} (1-\sec (c+d x))\right )}{d}-\frac{\cot (c+d x) (a \sec (c+d x)+a)^n}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.132263, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {3875, 3828, 3827, 69} \[ \frac{2^{n-\frac{1}{2}} n \tan (c+d x) (\sec (c+d x)+1)^{-n-\frac{1}{2}} (a \sec (c+d x)+a)^n \, _2F_1\left (\frac{1}{2},\frac{3}{2}-n;\frac{3}{2};\frac{1}{2} (1-\sec (c+d x))\right )}{d}-\frac{\cot (c+d x) (a \sec (c+d x)+a)^n}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3875
Rule 3828
Rule 3827
Rule 69
Rubi steps
\begin{align*} \int \csc ^2(c+d x) (a+a \sec (c+d x))^n \, dx &=-\frac{\cot (c+d x) (a+a \sec (c+d x))^n}{d}+(a n) \int \sec (c+d x) (a+a \sec (c+d x))^{-1+n} \, dx\\ &=-\frac{\cot (c+d x) (a+a \sec (c+d x))^n}{d}+\left (n (1+\sec (c+d x))^{-n} (a+a \sec (c+d x))^n\right ) \int \sec (c+d x) (1+\sec (c+d x))^{-1+n} \, dx\\ &=-\frac{\cot (c+d x) (a+a \sec (c+d x))^n}{d}-\frac{\left (n (1+\sec (c+d x))^{-\frac{1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)\right ) \operatorname{Subst}\left (\int \frac{(1+x)^{-\frac{3}{2}+n}}{\sqrt{1-x}} \, dx,x,\sec (c+d x)\right )}{d \sqrt{1-\sec (c+d x)}}\\ &=-\frac{\cot (c+d x) (a+a \sec (c+d x))^n}{d}+\frac{2^{-\frac{1}{2}+n} n \, _2F_1\left (\frac{1}{2},\frac{3}{2}-n;\frac{3}{2};\frac{1}{2} (1-\sec (c+d x))\right ) (1+\sec (c+d x))^{-\frac{1}{2}-n} (a+a \sec (c+d x))^n \tan (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 1.05219, size = 87, normalized size = 0.89 \[ -\frac{\tan \left (\frac{1}{2} (c+d x)\right ) (a (\sec (c+d x)+1))^n \left (-2 n \left (\cos (c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right )\right )^n \text{Hypergeometric2F1}\left (\frac{1}{2},n,\frac{3}{2},\tan ^2\left (\frac{1}{2} (c+d x)\right )\right )+\cot ^2\left (\frac{1}{2} (c+d x)\right )-1\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.276, size = 0, normalized size = 0. \begin{align*} \int \left ( \csc \left ( dx+c \right ) \right ) ^{2} \left ( a+a\sec \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]